import time

self.setVar("setVarTest","testVal")

self.publish("receiveTest",i=1,b=True,f=3.14,s="hey")

self.log("rpc result", self.callRpc("rpcTest",num=4))

num = 10000

start = time.time()
defers = [self.deferRpc("rpcTest",num=i) for i in range(num)]
results = [defer() for defer in defers]
diff = time.time() - start
self.log("defer",diff)

start = time.time()
results = [self.callRpc("rpcTest",num=i) for i in range(num)]
diff = time.time() - start
self.log("direct",diff)

self.shutdown()
